<%@page import="java.util.Map"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<% String appPath = request.getContextPath();%>  
<!DOCTYPE html>
<html>
  <head>
    <title>建议反馈</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link rel="stylesheet" href="http://cdn.bootcss.com/twitter-bootstrap/3.0.3/css/bootstrap.min.css">
	
	<style type="text/css">
		body{font-family:"ff-tisa-web-pro-1","ff-tisa-web-pro-2","Lucida Grande","Helvetica Neue",Helvetica,Arial,"Hiragino Sans GB","Hiragino Sans GB W3","WenQuanYi Micro Hei",sans-serif;}
h1, .h1, h2, .h2, h3, .h3, h4, .h4, .lead {font-family:"ff-tisa-web-pro-1","ff-tisa-web-pro-2","Lucida Grande","Helvetica Neue",Helvetica,Arial,"Hiragino Sans GB","Hiragino Sans GB W3","Microsoft YaHei UI","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif;}
	
	</style>
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.min.js"></script>
        <script src="http://cdn.bootcss.com/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
	
<div class="container">
<h3>建议反馈</h3>
<small class="pull-left">
为保证我们更好的服务，请提出您的宝贵建议。
</small><br>
<hr>

<form id="feedbackform" class="form-horizontal" action="${ctx}/web/saveFeedBack" method="post">
<input name="CARDID" type="hidden" class="form-control" value="${person.CARDID }">
   <div class="form-group">
	    <label for="NAME" class="col-xs-4 col-sm-2 control-label text-right">您的姓名：</label>
	    <div class="col-xs-8 col-sm-10">
	     <input name="NAME" type="text" class="form-control" value="${person.NAME }" placeholder="您的姓名" required>
	    </div>
   </div>
   <div class="form-group">
	    <label for="CARDID" class="col-xs-4 col-sm-2 control-label text-right">身份证：</label>
	    <div class="col-xs-8 col-sm-10">
	     <input name="CARDID" type="text" class="form-control" value="${person.CARDID }" placeholder="身份证" required>
	    </div>
   </div>
   <div class="form-group">
	    <label for="PHONE" class="col-xs-4 col-sm-2 control-label text-right">手机号：</label>
	    <div class="col-xs-8 col-sm-10">
	     <input name="PHONE" type="text" class="form-control" value="${person.PHONE }" placeholder="手机号" required>
	    </div>
   </div>
   <div class="form-group">
	    <label for="FEEDBACK" class="col-xs-4 col-sm-2 control-label">建议反馈：</label>
	    <div class="col-xs-8 col-sm-10">
	    	<textarea class="form-control" name="FEEDBACK" rows="3" placeholder="填写您的宝贵建议"></textarea>
	    </div>
	</div>

<div class="row">
  <div class="text-center col-xs-12 col-sm-12"><button id="sbtn" type="button" data-loading-text="正在提交..." class="btn btn-primary col-xs-12 col-sm-12">提交</button></div>
  <!-- Optional: clear the XS cols if their content doesn't match in height -->
  <div class="clearfix visible-xs"></div>
</div>

</form>


</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="http://cdn.bootcss.com/twitter-bootstrap/3.0.3/js/bootstrap.min.js"></script>

<script src="${ctx}/static/jquery-validation/1.11.0/jquery.validate.js" type="text/javascript"></script>
<script src="${ctx}/static/jquery-validation/1.11.0/messages_zh.js" type="text/javascript"></script>

<script type="text/javascript">

$(document).ready(function(){
	$("#feedbackform").validate({
		rules: {
			NAME: {
				required:true
			},
			CARDID:{
				required:true
			},
			PHONE:{
				required:true
			},
			FEEDBACK:{
				required:true
			}
		}});
	$("#sbtn").click(submitFeedback);
	
});

function submitFeedback(){
	
	if($("#feedbackform").valid() == false){
		return;
	}
	$("#sbtn").button('loading');
	$("#feedbackform").submit();
}


</script>
  </body>
</html>